package com.yc.sole.erp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yc.sole.framework.mybatis.entity.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;

/**
 * @author yizuomin
 * @date 2023/5/7 9:37
 **/
@Data
@Entity
@Table(name = "erp_mold")
@TableName("erp_mold")
public class Mold extends BaseEntity {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 模具名称
     */
    @Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '模具名称'")
    private String moldName;
    /**
     * 分类id
     */
    @Column(columnDefinition = "BIGINT NOT NULL COMMENT '分类id'")
    private Long categoryId;
    /**
     * 分类名称
     */
    @Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '分类名称'")
    private String categoryName;
    /**
     * 单位
     */
    @Column(columnDefinition = "VARCHAR(10) NOT NULL COMMENT '单位'")
    private String unit;
    /**
     * 供应商
     */
    @Column(columnDefinition = "BIGINT COMMENT '供应商'")
    private Long supplierId;
    /**
     * 供应商名称
     */
    @Column(columnDefinition = "VARCHAR(50) COMMENT '供应商名称'")
    private String supplierName;
    /**
     * 制造日期
     */
    @Column(columnDefinition = "VARCHAR(10) COMMENT '制造日期'")
    private String madeDate;
    /**
     * 位置
     */
    @Column(columnDefinition = "VARCHAR(50) COMMENT '位置'")
    private String position;
    /**
     * 产量 一模几双
     */
    @Column(columnDefinition = "INT NOT NULL DEFAULT 2 COMMENT '产量'")
    private Integer capacity;
    /**
     * 重量
     */
    @Column(columnDefinition = "INT NOT NULL DEFAULT 0 COMMENT '重量'")
    private Integer weight;
    /**
     * 备注
     */
    @Column(columnDefinition = "VARCHAR(255) COMMENT '备注'")
    private String remark;
    /**
     * 是否删除
     */
    @TableLogic
    @Column(columnDefinition = "INT NOT NULL DEFAULT 0 COMMENT '是否已删除'")
    private Integer deleted;
}
